<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>吐槽我们</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="format-detection" content="telephone=no">
	<c:set var="ctx" value="${pageContext.request.contextPath}" />
    <link rel="stylesheet" href="${ctx}/assets/css/amazeui.min.css">
    <link rel="stylesheet" href="${ctx}/assets/css/style.css?v=2.3">
    <link rel="stylesheet" href="${ctx}/assets/css/index.css?v=2.3">
</head>
<body class="bg-gray">
<header data-am-widget="header" class="am-header am-header-default am-header-fixed am-border-bottom">
    <div class="am-header-left am-header-nav">
        <a onclick="history.go(-1)"> <i class="icon_8"></i>
        </a>
    </div>
    <h1 class="am-header-title">
        吐槽我们
    </h1>
    <div  class="am-header-right am-header-nav am-text-right" >
       <span onclick="gotoTuCao()">吐槽</span>
    </div>
</header>
<section class="am-padding-bottom-sm" id="amz-main" data-tag="css-nav">

    <div class="bg-white  am-padding-left-sm ">
        <textarea class="teshu-yaoqiu" rows="6" placeholder="why?哪里不爽..." id="content"></textarea>
    </div>
</section>


<script src="${ctx}/assets/js/jquery.min.js"></script>
<script src="${ctx}/assets/js/amazeui.min.js"></script>
<script>
function gotoTuCao(){
	var content=$("#content").val();
	var gotoTuCao=$.ajax({url:"${ctx}/gotoTuCao2?content="+content,async:false});
    var gotoTuCaoJson=JSON.parse(gotoTuCao.responseText);
    if(gotoTuCaoJson.resultCode=="0"){
    
    	var modelHtml="<div class='am-modal am-modal-confirm' tabindex='-1' id='my-confirm1100'>";
			    modelHtml+="<div class='am-modal-dialog'>";
			    modelHtml+="    <div class='am-modal-hd'>佐心科技</div>";
			    modelHtml+="    <div class='am-modal-bd' id='alertMsg'>";
			           modelHtml+="您已吐槽成功!";
			    modelHtml+="    </div>";
			    modelHtml+="    <div class='am-modal-footer'>";
			    modelHtml+="        <span class='am-modal-btn' data-am-modal-confirm>确定</span>";
			    modelHtml+="    </div>";
			    modelHtml+="</div>";
			modelHtml+="</div>";
			$("body").append(modelHtml);
    		$('#my-confirm1100').modal({
            relatedTarget: this,
            onConfirm: function(options) {
            	location.href="myCounse.jsp";
            },
            // closeOnConfirm: false,
            onCancel: function() {

            }
        });
    }
}
</script>


</body>
</html>